<?php if(isset($grats)){?><div id="nav"> <?php echo $grats; ?> Successfully <?php echo $action; ?> </div><?php } ?>
<div id="nav"><h2><img src="<?php echo base_url();?>asset/images/list.png" />  Lista De Ordenes en DB</h2><br />
<table border="0" cellspacing="0" cellpadding="0" width="99%" id="resultTable">
  <thead>
<tr>
<th>id</th>
<th>volume</th>
<th>name</th>
<th>date</th>
<th>Weight</th>
<th>Finalize</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php if(isset($main)) : foreach($main as $row) : ?>
 <?php 
 echo "<tr>";
 echo "<td>".$row->id."</td>";
 	echo "<td>".$row->volume."</td>"; 
   echo "<td>".$row->name."</td>";
    echo "<td>".$row->date."</td>";
    echo "<td>".$row->weight."</td>";
    if($row->finalize == 1){echo "<td> Closed </td>";}else{echo "<td> Open </td>";}
    echo "<td>";
    $url = base_url();
    echo anchor("start/del_order/$row->id", "<img src='{$url}asset/images/delete.png' alt='Delete' border='0' />");
    echo " | ". anchor("start/edit_order/$row->id", "<img src='{$url}asset/images/edit.png' alt='Edit Order' border='0' />");
    echo " | ". anchor("start/print_order/$row->id", "<img src='{$url}asset/images/printer.png' alt='Edit Order' border='0' />");
    echo " | ". anchor("start/pdf/$row->id", "<img src='{$url}asset/images/pdf.png' alt='Download PDF' border='0' />");
    echo "</td>"; 
 echo "</tr>"; 
 ?>
 <?php endforeach; ?>
 <?php else : ?>	
	<tr>No records were returned.</tr>
	<?php endif; ?>
  </tbody>
</table>
</div>

